package com.nycreativity.elecreativity.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.nycreativity.elecreativity.entity.param.order.OrderAddParam
import com.nycreativity.elecreativity.entity.param.order.OrderPaymentParam
import com.nycreativity.elecreativity.entity.param.order.OrderQueryParam
import com.nycreativity.elecreativity.entity.po.Order
import com.nycreativity.elecreativity.entity.vo.PageDataVO
import com.nycreativity.elecreativity.entity.vo.order.OrderItemVO
import com.nycreativity.elecreativity.entity.vo.order.OrderOverviewVO

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author sxt && ttxxi
 * @since 2021-03-11
 */
interface OrderService : IService<Order> {

    /**
     * 添加订单信息
     * @param orderAddParams OrderAddParams
     * @return Boolean true代表添加成 false代表添加失败
     */
    fun addOrder(orderAddParams: List<OrderAddParam>): Long?

    /**
     * 查询订单概览
     * @param orderQueryParam OrderQueryParam
     * @return List<OrderOverviewVO>
     */
    fun queryOrderOverview(orderQueryParam: OrderQueryParam): PageDataVO<OrderOverviewVO>?

    /**
     * 查询订单详细的商品items
     * @param orderId Long 订单id
     * @return List<OrderItemVO>
     */
    fun queryOrderItems(orderId: Long): List<OrderItemVO>

    /**
     * 删除订单
     * @param orderIds Long
     * @return Boolean
     */
    fun removeOrder(orderIds: Array<Long>): Boolean

    /**
     * 修改订单支付相关信息
     * @param orderPaymentParam OrderPaymentParam 订单支付信息修改入参
     * @return Boolean 修改是否成功
     */
    fun updateOrderPaymentInfo(param: OrderPaymentParam): Boolean
}
